doc: document that an empty OPENSSL_CONF skips config loading - #64949
doc: document that an empty OPENSSL_CONF skips config loading#64949orgads wants to merge 1 commit into
Conversation
|
Review requested:
|
dccd16f to
1480dd6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64949 +/- ##
==========================================
- Coverage 90.29% 90.28% -0.01%
==========================================
Files 759 759
Lines 248295 248295
Branches 46861 46858 -3
==========================================
- Hits 224205 224184 -21
+ Misses 15517 15515 -2
- Partials 8573 8596 +23 🚀 New features to boost your workflow:
|
1480dd6 to
e9e2c31
Compare
|
I'm not certain hiding an error reading something that may (or may not, i haven't done that due dilligence) be a convention and openssl default is a good idea. Making the error clearer I'd have no issue with. |
The branch only fires when neither Does that address your concern? If you'd still rather not have it silent, I can print the error to stderr as a warning and continue. |
|
Setting And I don't think the FIPS argument holds — the default I'd rather keep it fatal and mention |
e9e2c31 to
d76097d
Compare
d76097d to
0d8303f
Compare
|
You're right on both counts - Reworked: the error stays fatal, and now says to point |
|
I'd drop the |
A default OpenSSL configuration file that exists but cannot be read is fatal at startup: CONF_MFLAGS_IGNORE_MISSING_FILE only covers ENOENT and ENOTDIR, so a container that mounts /etc/ssl inaccessible to the user Node.js runs as cannot start at all. OpenSSL skips config loading entirely when OPENSSL_CONF is set to an empty value, which gets past this, but that was undocumented. Say so, including that no configuration is applied, FIPS setup included. Refs: nodejs#62230 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
0d8303f to
096ad5b
Compare
|
Done. Dropped the src/node.cc change and took your wording verbatim. I kept the test. It asserts only existing behaviour - unreadable default config is fatal, |
Failed to start CI- Validating Jenkins credentials ✔ Jenkins credentials valid - Starting PR CI job ✘ Failed to start PR CI: 400 Bad Requesthttps://github.com/nodejs/node/actions/runs/31158438472 |
OpenSSL is initialized with CONF_MFLAGS_IGNORE_MISSING_FILE, so a missing configuration file does not prevent Node.js from starting.
That flag only covers ENOENT and ENOTDIR though, so a file that exists but cannot be opened is still fatal. Running in a container where /etc/ssl is not accessible to the current user aborts startup with an error that gives no way out:
There is a way out: OpenSSL skips config loading entirely when OPENSSL_CONF is set to an empty value. Say so in the error message, along with the options that select a different file, and document the empty value.
Closes: #62230